/*
 * @Author: LAB
 * @Date: 2021-03-30 11:33:09
 * @Description: 配置文件
 * @FilePath: \HisDrugWeb\client-app\src\config\config.js
 */
const env = process.env.NODE_ENV
var config = {}
console.log("NODE_ENV", env)

// 药品目录登录信息
const authOptions = {
  client_id: "0179443f-e3f1-43e5-b6c8-2c123e412091",
  client_secret: "84215AD39DE34AAEA4236F6A99497129",
  grant_type: "password",
  eid: "01794484-85b9-4669-802d-53cf32e98f71",
}
const CONFIG_LIST = new Map([
  // 生产环境
  ["pro", {
    baseUrl: "http://10.10.107.25/his-drug-api", // 后端基础地址
    authUrl: "http://10.10.107.25",
    authOptions,
    domain: "http://10.10.107.25/his-drug-api", // cdn图片基础地址
  }],
  // 开发
  ["dev", {
    baseUrl: "http://10.10.107.64:5000",
    authUrl: "http://10.10.107.25",
    domain: "",
    authOptions,
    isDebug: false // 是否开启数据mock
  }],
  // mengjie
  ["mj", {
    baseUrl: "http://10.10.107.64:5000",
    authUrl: "http://10.10.107.25",
    domain: "",
    authOptions,
    isDebug: false // 是否开启数据mock
  }],
  // zhaoyao
  ["zy", {
    baseUrl: "http://10.10.107.96:5000",
    authUrl: "http://10.10.107.25",
    domain: "",
    authOptions,
    isDebug: false // 是否开启数据mock
  }],
  // mengcy
  ["cy", {
    baseUrl: "http://10.10.107.76:5000",
    authUrl: "http://10.10.107.25",
    domain: "",
    authOptions,
    isDebug: false // 是否开启数据mock
  }]
])

switch (env) {
  // 生产环境
  case "production":
    config = CONFIG_LIST.get("pro")
    break;
  // 开发调试环境
  case "development":
    config = CONFIG_LIST.get("pro")
    break;
  default:
    break;
}

export default config
